package com.kun.learn.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
/**
 * Created by kun on 2017/5/23.
 */
@RestController
public class ConsumerController {
	@Autowired
	RestTemplate restTemplate;

	@GetMapping("/add")
	public String add() {
		return restTemplate.getForEntity("http://compute-service/add", String.class).getBody();
	}
}
